
<?php
//echo '<pre>';
 //print_r ($accountLists);
//echo '</pre>';
?>


		<!--    Content     -->
<?php if ($accountLists!=null){	?>
		
<table id = 'tl' border="2">
<tr>
<th>Username</th>
<th>created_date</th>
<th>last_login</th>
<th>status</th>
<th>view</th>
<th>delete</th>
</tr>
<?php foreach ($accountLists as $i) 	{ ?>
<tr>
<td><?php echo $i['Account']['username'];?></td>
<td><?php echo "        ".$i['Account']['created_date'];?></td>
<td><?php echo "        ".$i['Account']['last_login'];?></td>
<td><?php if($i['Account']['status']==1) echo 'on';else echo 'off';?></td>
<td><?php echo $this->Html->link('View', array('action' => 'view_teacher', $i['Account']['id']));?></td>
<td>    <?php echo $this->Html->link(
        'Delete',
        array('action' => 'delete_teacher', $i['Account']['id'],$i['Teacher'][0]['id']),
        null,
		'Are you sure?'
    )?></td>
</tr>
<?php }}
else
	echo "<h1 color = 'red'>Khong tim thay ket qua phu hop</h1>";

?>
